<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script>
    function check(buttonObj){
        var x=9;
        console.log('x = '+x);
    }

    {
        //定义变量，该变量只能在语句块中有效
        let b= 5;
        b=7;
        //定义常量，该变量的值在运行期间不能改变
        const a =9;
        var c= 9;
        // a=11;   编译报错
        // alert(b+"  "+a);
    }

    let x;
    function foo(y){
        if (y>10){
            return 'y>10';
        }
    }
    console.log('x='+x); //输出undefined。  console不会阻塞
    // alert(foo(20));
    // alert(foo(3));

    function print(a,b,c){
        console.log(a+"   "+b+"  "+c);
    }
    print('wc',3,'sd','qwe'); // 打印  wc  3  sd
    print('2','qqq'); //打印 2 qqq  undefined

    let s=0;
    let f=9>10;
    let u=undefined;
    let n=null;
    if (s){
        console.log('true')
    }else{
        console.log('false');
    }


  </script>
</head>
<body>
<input type="button" value="确定" id="okButton" onclick="check(this)">
</body>
</html>